package com.health.mapp.impl;

import org.apache.commons.lang3.StringUtils;

import com.health.db.service.order.IGoodsDrugListService;
import com.health.mapp.bean.Header;
import com.health.mapp.bean.QueryGoodsDrugDetailReq;
import com.health.mapp.bean.QueryGoodsDrugDetailResp;
import com.health.mapp.utils.Response;
import com.health.mapp.utils.ResultCode;

/**
 *  订单查询类
 * @author HiRoad
 *
 */
public class QueryGoodsDrugDetailImpl implements ActionInterface {
	private IGoodsDrugListService goodsDrugListService  ;
	
	@Override
	public Response execute(Header header, Object reqBean) throws Exception {
		
		QueryGoodsDrugDetailReq req=(QueryGoodsDrugDetailReq) reqBean;
		QueryGoodsDrugDetailResp _resp= new QueryGoodsDrugDetailResp();
		
		//判断入参
		if (StringUtils.isBlank(req.getRecid())) {
			_resp.setGoodsDrug(goodsDrugListService.selectByPrimaryKey(Long.valueOf(req.getRecid())));
			 
		}else{
			_resp.setErrorCode(ResultCode.OPERATION_LAKE_PARAMETER_ERROR);
			_resp.setErrorMsg(ResultCode.OPERATION_LAKE_PARAMETER_ERROR_NOTE);
            return _resp;
		}
		
		return _resp;
	}

	public IGoodsDrugListService getGoodsDrugListService() {
		return goodsDrugListService;
	}

	public void setGoodsDrugListService(IGoodsDrugListService goodsDrugListService) {
		this.goodsDrugListService = goodsDrugListService;
	}
	
	

}
